package com.taobao.txc.resourcemanager.a;

import com.taobao.txc.common.LoggerInit;
import com.taobao.txc.common.LoggerWrap;
import com.taobao.txc.common.TxcContext;
import com.taobao.txc.common.config.o;
import com.taobao.txc.parser.b.a.g;
import com.taobao.txc.resourcemanager.b.a.d;
import java.sql.SQLException;
import org.apache.commons.lang.StringUtils;

public class a<T>
  implements com.taobao.txc.resourcemanager.a.a.a<T>
{
  private static final LoggerWrap b = LoggerInit.logger;
  private final g c;
  private final com.taobao.txc.resourcemanager.b.a.b d;
  private final com.taobao.txc.resourcemanager.b.a.a e;
  private final d f;
  private final com.taobao.txc.resourcemanager.b.b.a.a<T> g;
  protected static String a = null;
  
  public a(com.taobao.txc.resourcemanager.b.a.a parama, d paramd, com.taobao.txc.resourcemanager.b.b.a.a<T> parama1, g paramg)
  {
    this.f = paramd;
    this.e = parama;
    this.d = this.e.a();
    this.g = parama1;
    this.c = paramg;
    if (this.c != null) {
      this.c.a(paramd);
    }
  }
  
  public T a(Object... paramVarArgs)
  {
    if (b.b())
    {
      com.taobao.txc.common.a.a.a().c();
      Object localObject1 = null;
      try
      {
        Object localObject2 = this.g.b(this.f.f(), paramVarArgs);
        return localObject2;
      }
      catch (SQLException localSQLException)
      {
        localObject1 = localSQLException;
        throw localSQLException;
      }
      finally
      {
        if ((this.f instanceof com.taobao.txc.resourcemanager.b.a.c))
        {
          if (localObject1 == null) {
            b.a("tran.read", new Object[] { TxcContext.getCurrentXid(), "1", Long.valueOf(com.taobao.txc.common.a.a.a().c()), "", Long.valueOf(com.taobao.txc.common.a.a.a().d()), this.f.g(), ((com.taobao.txc.resourcemanager.b.a.c)this.f).d() });
          } else {
            b.a("tran.read", new Object[] { TxcContext.getCurrentXid(), "0", Long.valueOf(com.taobao.txc.common.a.a.a().c()), localObject1.getMessage(), Long.valueOf(com.taobao.txc.common.a.a.a().d()), this.f.g(), ((com.taobao.txc.resourcemanager.b.a.c)this.f).d() });
          }
        }
        else if (localObject1 == null) {
          b.a("tran.read", new Object[] { TxcContext.getCurrentXid(), "1", Long.valueOf(com.taobao.txc.common.a.a.a().c()), "", Long.valueOf(com.taobao.txc.common.a.a.a().d()), this.f.g(), "" });
        } else {
          b.a("tran.read", new Object[] { TxcContext.getCurrentXid(), "0", Long.valueOf(com.taobao.txc.common.a.a.a().c()), localObject1.getMessage(), Long.valueOf(com.taobao.txc.common.a.a.a().d()), this.f.g(), "" });
        }
      }
    }
    return this.g.b(this.f.f(), paramVarArgs);
  }
  
  public com.taobao.txc.resourcemanager.b.a.a a()
  {
    return this.e;
  }
  
  public d b()
  {
    return this.f;
  }
  
  public g c()
  {
    if (this.c == null) {
      throw new com.taobao.txc.common.b.c("sqlVisitor is null");
    }
    return this.c;
  }
  
  public com.taobao.txc.resourcemanager.b.b.a.a<T> d()
  {
    return this.g;
  }
  
  static
  {
    try
    {
      try
      {
        String str = o.a().a("com.taobao.txc.skip.tables", "TXC_GROUP");
        if (!StringUtils.isEmpty(str)) {
          a = str;
        }
      }
      catch (Exception localException1) {}
      o.a().a("com.taobao.txc.skip.tables", "TXC_GROUP", new b());
    }
    catch (Exception localException2) {}
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.resourcemanager.a.a
 * JD-Core Version:    0.7.0.1
 */